{% extends 'web/base.html' %}
{% load staticfiles %}
{% block base_title %} 订单详情 {% endblock %}

<!--{% block manifest %}appcache/order.appcache{% endblock %}-->
{% block base_run %}order{% endblock %}

{% block base_body %}
{% verbatim %}
<div class="order_con scroll all_bg" id="order">
    <div v-if="loading"></div>
    <div v-else class="load_fix" style="background:none;">
        <div class="zuan_center">
            <div class="ui active centered inline loader red" style="top: 50%;transform: scale(.6)"></div>
        </div>
    </div>

    <div class="order_bian">
        <span style="float: left">订单编号：{{ tabXiang.number }}</span>
        <span style="float: right">创建时间：{{ tabXiang.time }}</span>
    </div>
    <div class="zuan_buy">
        <div class="zuan_buy_t">
            <div class="zuan_buy_tl">
                <div class="zuan_buy_tli"></div>
                <div class="zuan_buy_txt" v-if="tabXiang.cate==1">股票钻石</div>
                <div class="zuan_buy_txt" v-else="tabXiang.cate==2">期货钻石</div>
            </div>
            <div class="zuan_buy_tr" v-if="tabXiang.status==2">
                交易成功
            </div>
            <div class="zuan_buy_tr" v-if="tabXiang.status==1">
                待付款
            </div>
        </div>
        <div class="zuan_buy_b">
            <div class="zuan_buy_img">
                <img :src="'http://www.zgtxcj.com/'+tabXiang.image" height="100%">
            </div>
            <div class="zuan_buy_tx">
                <p class="zuan_buy_p1">{{ tabXiang.name }}专享</p>
                <div class="zuan_buy_p2">
                    <p style="float: right">{{ tabXiang.num }}个月</p>
                </div>
                <div class="zuan_buy_mon">
                    实付款：￥{{ tabXiang.dpayprice*tabXiang.num }}
                </div>
            </div>
        </div>
    </div>
    <div class="ding_shou">
        <div class="ding_shou_t">收款方</div>
        <div class="ding_shou_jie">公司名称：天下财经（北京）证券咨询有限公司</div>
        <div class="ding_shou_jie">招商银行：110-92867-1810-901</div>
        <div class="ding_shou_jie">公司邮箱：txcaijing@sina. com</div>
        <div class="ding_shou_di">
            <!--<div class="ding_shou_cheng">城市：石家庄</div>-->
            <div class="ding_shou_cheng" style="width:5rem">联系电话：400-6311-265</div>
        </div>
    </div>
    <div class="order_tishi">
        温馨提示：如遇支付或订单疑问，请联系ＱＱ客服或拨打400电话咨询，感谢您的支持！
    </div>
</div>
{% endverbatim %}
{% endblock %}

{% block base_script %}
    var order = new Vue({
        el:'#order',
        data:{
            tabId:localStorage.getItem('tabId'),
            tabXiang:[],
            loading: false,
        },
        methods: {
            getTab:function(){
                var self=this;
                reqwest({
                    url:'http://api.zgtxcj.com/mobile/speorder/',
                    method:'post',
                    type:'json',
                    data:{
                        uid:localStorage.getItem('uid'),
                        od_id:localStorage.getItem('tabId')
                    },
                    success:function(resp){
                        resp['data']['time']=resp['data']['time'].replace(/T/,' ');
                        if(resp['data']['image'].indexOf('|')!=-1){
                            resp['data']['image']=resp['data']['image'].split('|')[0];
                        }
                        //resp['data']['image']=resp['data']['image'].split('|')[0];
                        self.tabXiang=resp['data'];
                        self.loading= true;
                    }
                })
            },
            run:function () {
                this.getTab()
            }
        },
    })
{% endblock %}
